<!--page not used at the moment - can be transformed later with check boxes to delere more than one article at a time-->
<?php include('fns_db_articles.php'); ?>
<?php include('../views/layouts/_header.php'); ?>
<?php include('../views/layouts/_left.php'); ?>
<?php //include('../check_if_admin.php');
if(!checkIfAdmin()){
	header("location: articles.php");
}
?>

<br/>
<p class="main-content-text">Choose Article to delete:</p>
<form action="manage_articles.php?action=del" method="post">

	<?php
	$myrow = get_all_articles_ordered_by_date();

	do
	{
		printf ("<p><input name='id' type='radio' value='%s'><label> %s</label></p>",$myrow["id"], $myrow["title"]);
	}while ($myrow = mysqli_fetch_assoc($result));
	?>

	<p> <input name="submit" type="submit" value="Delete Article">
	</p>

</form>


<?php include('../views/layouts/_footer.php'); ?>
